package com.syh.jn.scm.dto.supplier.finance.orderExpensesBill;

import lombok.Data;

import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.List;

@Data
public class OrderExpensesBillSto implements Serializable {
  /**
   * 原始单id
   */
  @NotNull(message = "原始单id不能为空")
  private Long sourceId;
  /**
   * 原始单编号
   */
  private String sourceCode;
  /**
   * 归属端id
   */
  @NotNull(message = "归属端id不能为空")
  private Long businessEntityId;
  /**
   * 原始单类型(1：销售单、2：采购单)
   */
  @NotNull(message = "单据类型不能为空")
  private Short orderType;
  /**
   * 录单人id
   */
  @NotNull(message = "录单人id不能为空")
  private Long brokerageId;
  /**
   * 费用明细
   */
  private List<OrderExpensesBillItemSto> items;

  @Data
  public class OrderExpensesBillItemSto implements Serializable{
    /**
     * 订单费用
     */
    @NotNull(message = "订单费用不能为空")
    private BigDecimal expenses;
    /**
     * 订单备注
     */
    private String remark;
    /**
     * 费用承担方(0:我方承担 1:对方承担)
     */
    @NotNull(message = "费用承担方不能为空")
    private Short expenseResponsible;
    /**
     * 纳入总额(0:不纳入总额 1:纳入总额)
     */
    @NotNull(message = "费用是否纳入总额不能为空")
    private Short includeTotalAmount;
  }
}
